-- GENERATED SPELL FOR [Emperor Cobra] --


function spell0_28011(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(52473,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28011', 606, 1)
end

function spell1_28011(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(27047,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28011', 0, 1)
end

function spell2_28011(pUnit, Event) --@Poison Spit,n/a--
pUnit:FullCastSpellOnTarget(32093,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28011', 12500, 1)
end

function spell3_28011(pUnit, Event) --@Poison Spit,n/a--
pUnit:FullCastSpellOnTarget(55556,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28011', 8000, 1)
end

function Sorts_28011(pUnit, Event)
local choix_sorts_28011 = math.random(0, 3)
if choix_sorts_28011 == 0 then
pUnit:RegisterEvent('spell0_28011', 1, 1)
end
if choix_sorts_28011 == 1 then
pUnit:RegisterEvent('spell1_28011', 1, 1)
end
if choix_sorts_28011 == 2 then
pUnit:RegisterEvent('spell2_28011', 1, 1)
end
if choix_sorts_28011 == 3 then
pUnit:RegisterEvent('spell3_28011', 1, 1)
end
end

function mob28011_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28011', math.random(1500, 3000), 1)
end

function mob28011_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28011_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28011_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28011, 1, 'mob28011_Action')
RegisterUnitEvent(28011, 2, 'mob28011_Leave')
RegisterUnitEvent(28011, 3, 'mob28011_Kill')
RegisterUnitEvent(28011, 4, 'mob28011_Die')
